package com.data.modules.jd.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.data.modules.jd.entity.JdOutCard;
import com.data.modules.jd.mapper.JdOutCardMapper;
import com.data.modules.jd.service.IJdOutCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description: jd_out_card
 * @Author: data-boot
 * @Date:   2023-09-19
 * @Version: V1.0
 */
@Service
public class JdOutCardServiceImpl extends ServiceImpl<JdOutCardMapper, JdOutCard> implements IJdOutCardService {

    @Autowired
    private JdOutCardMapper cardMapper;

    @Override
    public Map queryCarInfoByUserName(String name) {
        //根据创建人查询 进、出车辆数据 和昨日车辆
        Map map = cardMapper.searchCarInNum(name);
        map.putAll(cardMapper.searchYesdayCarInNum(name));

        return map;
    }

    @Override
    public List<Map> queryInOutCarInfo(String username) {
        return cardMapper.searInOutCarInfo(username);
    }
}
